/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ericsson.nfc.signing.record;

/**
 *
 * @author emarkki
 */
public class CertificateBytes {
   
    private byte[] bytes;

    public CertificateBytes(byte[] bytes) {
        this.bytes = bytes;
    }
    
    public byte[] getBytes() {
        return bytes;
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final CertificateBytes other = (CertificateBytes) obj;
        if (this.bytes != other.bytes && (this.bytes == null || !Arrays.equals(this.bytes, other.bytes))) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        return Arrays.hashCode(bytes);
    }

    public String toString() {
        return "cert[" + bytes.length + "]";
    }
    
}
